﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PcCtrlUI
{
	/// <summary>
	/// Interaction logic for TempProgress.xaml
	/// </summary>
	public partial class TempProgress : UserControl
	{
        double max;
        double min;

		public TempProgress()
		{
			this.InitializeComponent();
		}

        public void setMax(double max)
        {
            this.max = max;
        }

        public void setMin(double min)
        {
            this.min = min;
        }

        public void setValue(double value)
        {
            this.bar.Value = ((value - min) / (max - min)) * 100.0;
            this.currentValue.Content = value.ToString() + "°C";
        }
   
	}
	
	
}